<?php
/**
 * Enter description here ...
 * @author Micou13630
 *
 */
class auth_base implements IAuthentication {
	
	private $logged;
	private $level;
	
	/**
	 * Constructeur
	 */
	public function auth_base() {
		$this->logged 	= false;
		$this->level	= 0;
	}
	
	/**
	 * Login
	 * @param array $param
	 */
	public function login($username, $password) {
		if (strtolower($username) === 'jake' && strtolower($password) === 'pass') {
			$this->logged = true;
			$this->level	= 1;
		}
	}
	
	/**
	 * Renvoie l'état 
	 */
	public function isLogged() {
		return $this->logged;
	}
	
	/**
	 * Donne le niveau d'autorisation
	 */
	public function getPermissionLevel() {
		return $this->level;
	}
}
?>